<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    // 邮箱以这些结束.com|.cn|.sina|.net
    // var reg = /^[0-9a-zA-Z]{5,12}@(qq|163 )\.(com|cn|sina|net)$/
    // var str ='12345@qq.com'
    // console.log(reg.test(str))

    //@163.com
    var reg1 =/^[0-9a-zA-Z]{5,12}@163\.com/
    //@sina.com
    var reg2 =/^[0-9a-zA-Z]{5,12}@sina\.com/
    //@163.net
    var reg3=/^[0-9a-zA-Z]{5,12}@163\.net/
    //@yahoo.com.cn
    var reg4 =/^\w{5,12}@yanhoo\.com\.cn/
</script>